<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/pico/util/queue.h File Reference</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('queue_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">queue.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="pico_8h_source.html">pico.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="rp2__common_2hardware__sync_2include_2hardware_2sync_8h_source.html">hardware/sync.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="lock__core_8h_source.html">pico/lock_core.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for queue.h:</div>
<div class="dyncontent">
<div class="center"><img src="queue_8h__incl.png" border="0" usemap="#ainclude_2pico_2util_2queue_8h" alt=""/></div>
<map name="ainclude_2pico_2util_2queue_8h" id="ainclude_2pico_2util_2queue_8h">
<area shape="rect" title=" " alt="" coords="448,5,629,32"/>
<area shape="rect" href="pico_8h.html" title=" " alt="" coords="468,319,529,345"/>
<area shape="rect" href="rp2__common_2hardware__sync_2include_2hardware_2sync_8h.html" title=" " alt="" coords="577,155,706,181"/>
<area shape="rect" href="lock__core_8h.html" title=" " alt="" coords="475,80,602,107"/>
<area shape="rect" href="common_2pico__base__headers_2include_2pico_2types_8h_source.html" title=" " alt="" coords="751,543,852,569"/>
<area shape="rect" title=" " alt="" coords="271,393,385,420"/>
<area shape="rect" href="common_2pico__base__headers_2include_2pico_2config_8h_source.html" title=" " alt="" coords="143,393,247,420"/>
<area shape="rect" href="platform_8h.html" title=" " alt="" coords="890,393,1011,420"/>
<area shape="rect" href="error_8h_source.html" title=" " alt="" coords="409,393,503,420"/>
<area shape="rect" href="assert_8h_source.html" title=" " alt="" coords="681,617,786,644"/>
<area shape="rect" title=" " alt="" coords="647,692,729,719"/>
<area shape="rect" title=" " alt="" coords="834,617,905,644"/>
<area shape="rect" title=" " alt="" coords="929,617,1004,644"/>
<area shape="rect" title=" " alt="" coords="113,468,277,495"/>
<area shape="rect" href="compiler_8h_source.html" title=" " alt="" coords="1141,468,1323,495"/>
<area shape="rect" href="sections_8h_source.html" title=" " alt="" coords="579,468,757,495"/>
<area shape="rect" href="panic_8h_source.html" title=" " alt="" coords="781,468,941,495"/>
<area shape="rect" title=" " alt="" coords="1347,468,1557,495"/>
<area shape="rect" title=" " alt="" coords="966,468,1117,495"/>
<area shape="rect" title=" " alt="" coords="1137,543,1327,569"/>
<area shape="rect" href="address__mapped_8h.html" title=" " alt="" coords="791,237,1001,263"/>
<area shape="rect" href="spin__lock_8h_source.html" title=" " alt="" coords="567,229,715,271"/>
<area shape="rect" href="common_2pico__time_2include_2pico_2time_8h.html" title=" " alt="" coords="406,155,501,181"/>
<area shape="rect" href="rp2__common_2hardware__timer_2include_2hardware_2timer_8h.html" title=" " alt="" coords="197,237,331,263"/>
<area shape="rect" title=" " alt="" coords="5,319,187,345"/>
<area shape="rect" title=" " alt="" coords="211,319,381,345"/>
</map>
</div>
</div>
<p><a href="queue_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structqueue__t.html">queue_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a65449004a96a87745e8e912011554d9d"><td class="memItemLeft" align="right" valign="top"><a id="a65449004a96a87745e8e912011554d9d" name="a65449004a96a87745e8e912011554d9d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PICO_QUEUE_MAX_LEVEL</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a65449004a96a87745e8e912011554d9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6b379b09df9ac326e3c07a2727b7ca96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga6b379b09df9ac326e3c07a2727b7ca96">queue_init_with_spinlock</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, uint element_size, uint element_count, uint spinlock_num)</td></tr>
<tr class="memdesc:ga6b379b09df9ac326e3c07a2727b7ca96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a queue with a specific spinlock for concurrency protection.  <a href="group__queue.html#ga6b379b09df9ac326e3c07a2727b7ca96">More...</a><br /></td></tr>
<tr class="separator:ga6b379b09df9ac326e3c07a2727b7ca96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0aa8e36b5c51158d836e16c5be2b9925"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga0aa8e36b5c51158d836e16c5be2b9925">queue_init</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, uint element_size, uint element_count)</td></tr>
<tr class="memdesc:ga0aa8e36b5c51158d836e16c5be2b9925"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise a queue, allocating a (possibly shared) spinlock.  <a href="group__queue.html#ga0aa8e36b5c51158d836e16c5be2b9925">More...</a><br /></td></tr>
<tr class="separator:ga0aa8e36b5c51158d836e16c5be2b9925"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa13034dd0decdb0faf1b863383560be2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gaa13034dd0decdb0faf1b863383560be2">queue_free</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q)</td></tr>
<tr class="memdesc:gaa13034dd0decdb0faf1b863383560be2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the specified queue.  <a href="group__queue.html#gaa13034dd0decdb0faf1b863383560be2">More...</a><br /></td></tr>
<tr class="separator:gaa13034dd0decdb0faf1b863383560be2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ebf4d2dec7ad019b03c2994defdf046"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga2ebf4d2dec7ad019b03c2994defdf046">queue_get_level_unsafe</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q)</td></tr>
<tr class="memdesc:ga2ebf4d2dec7ad019b03c2994defdf046"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unsafe check of level of the specified queue.  <a href="group__queue.html#ga2ebf4d2dec7ad019b03c2994defdf046">More...</a><br /></td></tr>
<tr class="separator:ga2ebf4d2dec7ad019b03c2994defdf046"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5cc5a58d2cac83f33aac5e8bb4e35147"><td class="memItemLeft" align="right" valign="top">static uint&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga5cc5a58d2cac83f33aac5e8bb4e35147">queue_get_level</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q)</td></tr>
<tr class="memdesc:ga5cc5a58d2cac83f33aac5e8bb4e35147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check of level of the specified queue.  <a href="group__queue.html#ga5cc5a58d2cac83f33aac5e8bb4e35147">More...</a><br /></td></tr>
<tr class="separator:ga5cc5a58d2cac83f33aac5e8bb4e35147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8456f240608d3e58e5323bedadaeebe2"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga8456f240608d3e58e5323bedadaeebe2">queue_is_empty</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q)</td></tr>
<tr class="memdesc:ga8456f240608d3e58e5323bedadaeebe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if queue is empty.  <a href="group__queue.html#ga8456f240608d3e58e5323bedadaeebe2">More...</a><br /></td></tr>
<tr class="separator:ga8456f240608d3e58e5323bedadaeebe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed8287f549f6065fc89c5b56b9f9212e"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gaed8287f549f6065fc89c5b56b9f9212e">queue_is_full</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q)</td></tr>
<tr class="memdesc:gaed8287f549f6065fc89c5b56b9f9212e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if queue is full.  <a href="group__queue.html#gaed8287f549f6065fc89c5b56b9f9212e">More...</a><br /></td></tr>
<tr class="separator:gaed8287f549f6065fc89c5b56b9f9212e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga42ddfda77fa6e9c6292deda62d993ae3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga42ddfda77fa6e9c6292deda62d993ae3">queue_try_add</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, const void *data)</td></tr>
<tr class="memdesc:ga42ddfda77fa6e9c6292deda62d993ae3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking add value queue if not full.  <a href="group__queue.html#ga42ddfda77fa6e9c6292deda62d993ae3">More...</a><br /></td></tr>
<tr class="separator:ga42ddfda77fa6e9c6292deda62d993ae3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga31806423ac9c0b39ee7bb6473aa8d253"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga31806423ac9c0b39ee7bb6473aa8d253">queue_try_remove</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, void *data)</td></tr>
<tr class="memdesc:ga31806423ac9c0b39ee7bb6473aa8d253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking removal of entry from the queue if non empty.  <a href="group__queue.html#ga31806423ac9c0b39ee7bb6473aa8d253">More...</a><br /></td></tr>
<tr class="separator:ga31806423ac9c0b39ee7bb6473aa8d253"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2d65c218a1826243d64f6305417dcc0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gab2d65c218a1826243d64f6305417dcc0">queue_try_peek</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, void *data)</td></tr>
<tr class="memdesc:gab2d65c218a1826243d64f6305417dcc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Non-blocking peek at the next item to be removed from the queue.  <a href="group__queue.html#gab2d65c218a1826243d64f6305417dcc0">More...</a><br /></td></tr>
<tr class="separator:gab2d65c218a1826243d64f6305417dcc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad01f5e5ddf3403416097f31acc2dbeca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#gad01f5e5ddf3403416097f31acc2dbeca">queue_add_blocking</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, const void *data)</td></tr>
<tr class="memdesc:gad01f5e5ddf3403416097f31acc2dbeca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocking add of value to queue.  <a href="group__queue.html#gad01f5e5ddf3403416097f31acc2dbeca">More...</a><br /></td></tr>
<tr class="separator:gad01f5e5ddf3403416097f31acc2dbeca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga97fb187c127e26935b37785692d1776b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga97fb187c127e26935b37785692d1776b">queue_remove_blocking</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, void *data)</td></tr>
<tr class="memdesc:ga97fb187c127e26935b37785692d1776b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocking remove entry from queue.  <a href="group__queue.html#ga97fb187c127e26935b37785692d1776b">More...</a><br /></td></tr>
<tr class="separator:ga97fb187c127e26935b37785692d1776b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga104ec5baa82c9635163a511df7abf124"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__queue.html#ga104ec5baa82c9635163a511df7abf124">queue_peek_blocking</a> (<a class="el" href="structqueue__t.html">queue_t</a> *q, void *data)</td></tr>
<tr class="memdesc:ga104ec5baa82c9635163a511df7abf124"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocking peek at next value to be removed from queue.  <a href="group__queue.html#ga104ec5baa82c9635163a511df7abf124">More...</a><br /></td></tr>
<tr class="separator:ga104ec5baa82c9635163a511df7abf124"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>